using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using CMS.BLL;
using CMS.BLL.Entity;

public partial class Admin : System.Web.UI.Page
{
  
    protected void Page_Load(object sender, EventArgs e)
    {
       
        FillControlToPage();
        if (!IsPostBack)
        {
            this.InitData();
            this.SetCaptionForTitle();
            this.CheckPermission();
        }
    }
    private void InitData()
    {
        int nCurrentLanguage = Support.GetCurrentLanguage();

        Company objCompany = new Company();
        DataTable dtbCompany = new DataTable();
        dtbCompany = objCompany.Search();

        switch (nCurrentLanguage)
        {
            case 1:
                
                Page.Title = ConvertData.ConvertToString(dtbCompany.Rows[0]["CompanyName1"]);
              //  lblCompanyName.Text = ConvertData.ConvertToString(dtbCompany.Rows[0]["CompanyName1"]);
                break;
            case 2:
                Page.Title = ConvertData.ConvertToString(dtbCompany.Rows[0]["CompanyName2"]);
              //  lblCompanyName.Text = ConvertData.ConvertToString(dtbCompany.Rows[0]["CompanyName2"]);
                break;
            case 3:
                Page.Title = ConvertData.ConvertToString(dtbCompany.Rows[0]["CompanyName3"]);
              //  lblCompanyName.Text = ConvertData.ConvertToString(dtbCompany.Rows[0]["CompanyName3"]);
                break;

        }
    }
    private void SetCaptionForTitle()
    {
        int nCurrentLanguage = Support.GetCurrentLanguage();
        nCurrentLanguage = nCurrentLanguage -1 ;
        lnkGallery.Text = MultipleLanguage.GALLERIES[nCurrentLanguage].ToUpper();
        lnkContact.Text = MultipleLanguage.CONTACT[nCurrentLanguage].ToUpper();
        lnkTour.Text = MultipleLanguage.TOUR[nCurrentLanguage].ToUpper();
        lnkTestimonial.Text = MultipleLanguage.TESTIMONIAL[nCurrentLanguage].ToUpper();
        lnkTourCustomization.Text = MultipleLanguage.LBL_TOURCUSTOMIZATION[nCurrentLanguage].ToUpper();
        lnkBanner.Text = MultipleLanguage.BANNER[nCurrentLanguage].ToUpper();
        lnkVideo.Text = MultipleLanguage.VIDEO[nCurrentLanguage].ToUpper();
        lnkNews.Text = MultipleLanguage.NEWS[nCurrentLanguage].ToUpper();
        //lnkProduct.Text = MultipleLanguage.PRODUCT[nCurrentLanguage].ToUpper();
        lnkSetting.Text = MultipleLanguage.SETTING[nCurrentLanguage].ToUpper();
        lnkStaticPage.Text = MultipleLanguage.STATICPAGE[nCurrentLanguage].ToUpper();
        lnkUser.Text = MultipleLanguage.USER[nCurrentLanguage].ToUpper();
       // lnkBasket.Text = MultipleLanguage.BASKET[nCurrentLanguage].ToUpper();
      //  lnkLink.Text = MultipleLanguage.LINK[nCurrentLanguage].ToUpper();
        //lnkCompany.Text = MultipleLanguage.COMPANY[nCurrentLanguage].ToUpper();
        lnkHotel.Text = MultipleLanguage.HOTEL[nCurrentLanguage].ToUpper();
      //  lnkFaq.Text = MultipleLanguage.FAQ[nCurrentLanguage].ToUpper();
        lnkEntryVisa.Text = MultipleLanguage.ENTRYVISA[nCurrentLanguage].ToUpper();
        lnkCruise.Text = MultipleLanguage.CRUISE_TITLE[nCurrentLanguage].ToUpper();
        string sQuerry = getQuerryString(Config.PAGE);
        switch (sQuerry)
        {
            //PRIVATE
            case Pages.BackEnds.STR_USER_PRIVATE:
                lblPageTitle.Text = MultipleLanguage.PERSONAL[nCurrentLanguage].ToUpper();
                break;
            //SETTING
            case Pages.BackEnds.STR_SETTING:
                lblPageTitle.Text = MultipleLanguage.SETTING[nCurrentLanguage].ToUpper();
                break;
            //CONTACT
            case Pages.BackEnds.STR_CONTACT:
                lblPageTitle.Text = MultipleLanguage.CONTACT[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_CONTACT_ADD:
                lblPageTitle.Text = MultipleLanguage.CONTACT_DETAIL[nCurrentLanguage].ToUpper();
                break;
            //STATIC PAGE
            case Pages.BackEnds.STR_STATICPAGE :
                lblPageTitle.Text = MultipleLanguage.STATICPAGE[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_STATICPAGE_ADD:
                lblPageTitle.Text = MultipleLanguage.STATICPAGE_DETAIL[nCurrentLanguage].ToUpper();
                break;
            //ADV
            case Pages.BackEnds.STR_ADV :
                lblPageTitle.Text = MultipleLanguage.ADV[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_ADV_ADD :
                lblPageTitle.Text = MultipleLanguage.ADV_DETAIL[nCurrentLanguage].ToUpper();
                break;
            //ATTACHED FILE
            case Pages.BackEnds.STR_ATTCHEDFILE :
                lblPageTitle.Text = MultipleLanguage.ATTACHED[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_ATTCHEDFILE_ADD :
                lblPageTitle.Text = MultipleLanguage.ATTACHED_DETAIL[nCurrentLanguage].ToUpper();
                break;
            //FAQ
            case Pages.BackEnds.STR_FAQ :
                lblPageTitle.Text = MultipleLanguage.FAQ[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_FAQ_ADD:
                lblPageTitle.Text = MultipleLanguage.FAQ_DETAIL[nCurrentLanguage].ToUpper();
                break;
            //NEWS
            case Pages.BackEnds.STR_NEWS:
                lblPageTitle.Text = MultipleLanguage.NEWS[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_NEWS_ADD:
                lblPageTitle.Text = MultipleLanguage.NEWS_DETAIL[nCurrentLanguage].ToUpper();
                break;
            //NEWS CATEGORY
            case Pages.BackEnds.STR_NEWSCAT:
                lblPageTitle.Text = MultipleLanguage.NEWSCAT[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_NEWSCAT_ADD:
                lblPageTitle.Text = MultipleLanguage.NEWSCAT_DETAIL[nCurrentLanguage].ToUpper();
                break;
            //NEWS COMMENT
            case Pages.BackEnds.STR_COMMENT :
                lblPageTitle.Text = MultipleLanguage.COMMENT[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_COMMENT_ADD :
                lblPageTitle.Text = MultipleLanguage.COMMENT_DETAIL[nCurrentLanguage].ToUpper();
                break;
            //PRODUCT
            case Pages.BackEnds.STR_PRODUCT :
                lblPageTitle.Text = MultipleLanguage.PRODUCT[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_PRODUCT_ADD :
                lblPageTitle.Text = MultipleLanguage.PRODUCT_DETAIL[nCurrentLanguage].ToUpper();
                break;
            //PRODUCT CATEGORY
            case Pages.BackEnds.STR_PRODUCTCAT :
                lblPageTitle.Text = MultipleLanguage.PRODUCTCAT[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_PRODUCTCAT_ADD  :
                lblPageTitle.Text = MultipleLanguage.PRODUCTCAT_DETAIL[nCurrentLanguage].ToUpper();
                break;

            //PRODUCT TRADEMARK
            case Pages.BackEnds.STR_TRADEMARK :
                lblPageTitle.Text = MultipleLanguage.TRADEMARK[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_TRADEMARK_ADD :
                lblPageTitle.Text = MultipleLanguage.TRADEMARK_DETAIL[nCurrentLanguage].ToUpper();
                break;
            //PRODUCT MATERIAL
            case Pages.BackEnds.STR_MATERIAL :
                lblPageTitle.Text = MultipleLanguage.MATERIAL[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_MATERIAL_ADD :
                lblPageTitle.Text = MultipleLanguage.MATERIAL_DETAIL[nCurrentLanguage].ToUpper();
                break;

            //PRODUCT COLOR
            case Pages.BackEnds.STR_COLOR :
                lblPageTitle.Text = MultipleLanguage.COLOR[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_COLOR_ADD :
                lblPageTitle.Text = MultipleLanguage.COLOR_DETAIL[nCurrentLanguage].ToUpper();
                break;
            //CAREER
            case Pages.BackEnds.STR_CAREER :
                lblPageTitle.Text = MultipleLanguage.CAREER[nCurrentLanguage];
                break;
            case Pages.BackEnds.STR_CAREER_ADD :
                lblPageTitle.Text = MultipleLanguage.CAREER_DETAIL[nCurrentLanguage].ToUpper();
                break;
            //USER
            case Pages.BackEnds.STR_USER:
                lblPageTitle.Text = MultipleLanguage.USER[nCurrentLanguage];
                break;
            case Pages.BackEnds.STR_USER_ADD:
                lblPageTitle.Text = MultipleLanguage.USER_DETAIL[nCurrentLanguage].ToUpper();
                break;
            //GAlLERIES
            case Pages.BackEnds.STR_ALBUM:
                lblPageTitle.Text = MultipleLanguage.GALLERIES[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_ALBUM_ADD:
                lblPageTitle.Text = MultipleLanguage.GALLERIES_DETAIL[nCurrentLanguage].ToUpper();
                break;

            //BASKET
            case Pages.BackEnds.STR_BASKET :
                lblPageTitle.Text = MultipleLanguage.BASKET[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_BASKET_ADD :
                lblPageTitle.Text = MultipleLanguage.BASKET_DETAIL[nCurrentLanguage].ToUpper();
                break;

            //COMPANY
            case Pages.BackEnds.STR_COMPANY :
                lblPageTitle.Text = MultipleLanguage.COMPANY[nCurrentLanguage].ToUpper();
                break;

            case Pages.BackEnds.STR_COMPANY_ADD:
                lblPageTitle.Text = MultipleLanguage.COMPANY[nCurrentLanguage].ToUpper();
                break;
            //HOTLINE
            case Pages.BackEnds.STR_HOTLINE :
                lblPageTitle.Text = MultipleLanguage.HOTLINE[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_HOTLINE_ADD:
                lblPageTitle.Text = MultipleLanguage.HOTLINE[nCurrentLanguage].ToUpper();
                break;
            //LIVE
            case Pages.BackEnds.STR_LIVESUPPORT  :
                lblPageTitle.Text = MultipleLanguage.LIVESUPPORT[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_LIVESUPPORT_ADD:
                lblPageTitle.Text = MultipleLanguage.LIVESUPPORT[nCurrentLanguage].ToUpper();
                break;
            //DEPARTEMNT
            case Pages.BackEnds.STR_DEPARTMENT :
                lblPageTitle.Text = MultipleLanguage.DEPARTMENT[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_DEPARTMENT_ADD:
                lblPageTitle.Text = MultipleLanguage.DEPARTMENT[nCurrentLanguage].ToUpper();
                break;
            //LINK
            case Pages.BackEnds.STR_LINK:
                lblPageTitle.Text = MultipleLanguage.LINK [nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_LINK_ADD:
                lblPageTitle.Text = MultipleLanguage.LINK[nCurrentLanguage].ToUpper();
                break;

            case Pages.BackEnds.STR_CRUISE:
                lblPageTitle.Text = MultipleLanguage.CRUISE_TITLE[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_CRUISE_ADD:
                lblPageTitle.Text = MultipleLanguage.CRUISE_TITLE[nCurrentLanguage].ToUpper();
                break;

            case Pages.BackEnds.STR_TOUR:
                lblPageTitle.Text = MultipleLanguage.TOUR[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_TOUR_ADD:
                lblPageTitle.Text = MultipleLanguage.TOUR[nCurrentLanguage].ToUpper();
                break;

            case Pages.BackEnds.STR_TESTIMONIAL:
                lblPageTitle.Text = MultipleLanguage.TESTIMONIAL[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_TESTIMONIAL_ADD:
                lblPageTitle.Text = MultipleLanguage.TESTIMONIAL[nCurrentLanguage].ToUpper();
                break;

            case Pages.BackEnds.STR_HOTEL:
                lblPageTitle.Text = MultipleLanguage.HOTEL[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_HOTEL_ADD:
                lblPageTitle.Text = MultipleLanguage.HOTEL[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_HOTELPOPULAR:
                lblPageTitle.Text = MultipleLanguage.HOTEL_POPULAR[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_HOTELPOPULAR_ADD:
                lblPageTitle.Text = MultipleLanguage.HOTEL_POPULAR[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_BOOKINGHOTEL:
                lblPageTitle.Text = MultipleLanguage.HOTELBOOKING[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_BOOKINGHOTEL_ADD:
                lblPageTitle.Text = MultipleLanguage.HOTELBOOKING_ADD[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_BANNER:
                lblPageTitle.Text = MultipleLanguage.BANNER[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_BANNER_ADD:
                lblPageTitle.Text = MultipleLanguage.BANNER[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_VIDEO:
                lblPageTitle.Text = MultipleLanguage.VIDEO[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_VIDEO_ADD:
                lblPageTitle.Text = MultipleLanguage.VIDEO[nCurrentLanguage].ToUpper();
                break;

            case Pages.BackEnds.STR_TOURBOOKING:
                lblPageTitle.Text = MultipleLanguage.TOURBOOKING[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_TOURBOOKING_ADD:
                lblPageTitle.Text = MultipleLanguage.TOURBOOKING[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_TOURDEPARTURE:
                lblPageTitle.Text = MultipleLanguage.TOURDEPARTURE[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_TOURDEPARTURE_ADD:
                lblPageTitle.Text = MultipleLanguage.TOURDEPARTURE[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_TOURDESTINATION:
                lblPageTitle.Text = MultipleLanguage.TOURDESTINATION[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_TOURDESTINATION_ADD:
                lblPageTitle.Text = MultipleLanguage.TOURDESTINATION[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_TOURSALEOFF:
                lblPageTitle.Text = MultipleLanguage.SALEOFF[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_TOURSALEOFF_ADD:
                lblPageTitle.Text = MultipleLanguage.SALEOFF[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_TRANSPORT:
                lblPageTitle.Text = MultipleLanguage.TRANSPORT[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_TRANSPORT_ADD:
                lblPageTitle.Text = MultipleLanguage.TRANSPORT[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_REGION:
                lblPageTitle.Text = MultipleLanguage.REGION[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_REGION_ADD:
                lblPageTitle.Text = MultipleLanguage.REGION[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_TOURCATEGORY:
                lblPageTitle.Text = MultipleLanguage.TOURCATEGORY[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_TOURDURATION:
                lblPageTitle.Text = MultipleLanguage.TOURDURATION[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_COUNTRY:
                lblPageTitle.Text = MultipleLanguage.COUNTRY[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_TOURPOPULAR:
                lblPageTitle.Text = MultipleLanguage.POPULAR[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_TOURPOPULAR_ADD:
                lblPageTitle.Text = MultipleLanguage.POPULAR[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_COUNTRY_ADD:
                lblPageTitle.Text = MultipleLanguage.COUNTRY[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_TOURDURATION_ADD:
                lblPageTitle.Text = MultipleLanguage.TOURDURATION[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_TOURCATEGORY_ADD:
                lblPageTitle.Text = MultipleLanguage.TOURCATEGORY[nCurrentLanguage].ToUpper();
                break;







            case Pages.BackEnds.STR_CUSTOMERCOUNTRY:
                lblPageTitle.Text = MultipleLanguage.CUSTOMERCOUNTRY[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_CUSTOMERCOUNTRY_ADD:
                lblPageTitle.Text = MultipleLanguage.CUSTOMERCOUNTRY[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_HOTELOPTION:
                lblPageTitle.Text = MultipleLanguage.HOTELOPTION[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_HOTELOPTION_ADD:
                lblPageTitle.Text = MultipleLanguage.HOTELOPTION[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_MEAL:
                lblPageTitle.Text = MultipleLanguage.MEAL[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_MEAL_ADD:
                lblPageTitle.Text = MultipleLanguage.MEAL[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_PORTOFARRIVAL:
                lblPageTitle.Text = MultipleLanguage.PORTOFARRIVAL[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_PORTOFARRIVAL_ADD:
                lblPageTitle.Text = MultipleLanguage.PORTOFARRIVAL[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_TOURCUSTOMIZATION:
                lblPageTitle.Text = MultipleLanguage.TOURCUSTOMIZATION[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_TOURCUSTOMIZATION_ADD:
                lblPageTitle.Text = MultipleLanguage.TOURCUSTOMIZATION[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_TOURGUIDE:
                lblPageTitle.Text = MultipleLanguage.TOURGUIDE[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_TOURGUIDE_ADD:
                lblPageTitle.Text = MultipleLanguage.TOURGUIDE[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_TYPEOFTOURCUSTOMIZATION:
                lblPageTitle.Text = MultipleLanguage.TYPEOFTOURCUSTOMIZATION[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_TYPEOFTOURCUSTOMIZATION_ADD:
                lblPageTitle.Text = MultipleLanguage.TYPEOFTOURCUSTOMIZATION[nCurrentLanguage].ToUpper();
                break;



            case Pages.BackEnds.STR_ENTRYVISA:
                lblPageTitle.Text =  MultipleLanguage.ENTRYVISA[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_ENTRYVISA_ADD:
                lblPageTitle.Text = MultipleLanguage.ENTRYVISA[nCurrentLanguage].ToUpper();
                break;



            case Pages.BackEnds.STR_ARRIVEDDESTINATION:
                lblPageTitle.Text = MultipleLanguage.ARRIVEDDESTINATION[nCurrentLanguage].ToUpper();
                break;
            case Pages.BackEnds.STR_ARRIVEDDESTINATION_ADD:
                lblPageTitle.Text = MultipleLanguage.ARRIVEDDESTINATION[nCurrentLanguage].ToUpper();
                break;
            default:
                lblPageTitle.Text = MultipleLanguage.STATICPAGE[nCurrentLanguage].ToUpper();
                break;
        }
    }

    private void FillControlToPage()
    {
        bool isLogged = false;
        isLogged = IsLogIn();
        if (isLogged)
        {
            string sQuerryFromUrl = "";
            sQuerryFromUrl = getQuerryString(Config.PAGE);
            if (sQuerryFromUrl != "")
                LoadControlByPage(sQuerryFromUrl);
            else
            {
                LoadControlByPage(Pages.BackEnds.STR_STATICPAGE);
            }
        }
        else
        {
            RedirecToPage(Pages.FrontEnds.LOGIN);
        }
       
    }

    private string getQuerryString(string strQuerry)
    {
        string sQuerry = "";
        sQuerry = ConvertData.ConvertToString(Request.QueryString[strQuerry]);
        return sQuerry;
    }

    private void LoadControlByPage(string AdminPage)
    {
        string strPath = Config.ADMIN_FOLDER_CONTROL;
        switch (AdminPage.ToLower())
        {
            //BASKET
            case Pages.BackEnds.STR_BASKET :
                strPath = strPath + Config.ADMIN_FOLDER_PRODUCT  + Pages.BackEnds.CONTROL_BASKET;
                break;
            case Pages.BackEnds.STR_BASKET_ADD :
                strPath = strPath + Config.ADMIN_FOLDER_PRODUCT + Pages.BackEnds.CONTROL_BASKET_ADD ;
                break;
            //CONTACT
            case Pages.BackEnds.STR_CONTACT:
                strPath = strPath + Config.ADMIN_FOLDER_CONTACT + Pages.BackEnds.CONTROL_CONTACT;
                break;
            case Pages.BackEnds.STR_CONTACT_ADD:
                strPath = strPath + Config.ADMIN_FOLDER_CONTACT + Pages.BackEnds.CONTROL_CONTACT_ADD;
                break;
            //FAQ
            case Pages.BackEnds.STR_FAQ:
                strPath = strPath + Config.ADMIN_FOLDER_FAQ + Pages.BackEnds.CONTROL_FAQ;
                break;
            case Pages.BackEnds.STR_FAQ_ADD:
                strPath = strPath + Config.ADMIN_FOLDER_FAQ + Pages.BackEnds.CONTROL_FAQ_ADD;
                break;
            //ADV
            case Pages.BackEnds.STR_ADV:
                strPath = strPath + Config.ADMIN_FOLDER_ADV + Pages.BackEnds.CONTROL_ADV;
                break;
            case Pages.BackEnds.STR_ADV_ADD:
                strPath = strPath + Config.ADMIN_FOLDER_ADV + Pages.BackEnds.CONTROL_ADV_ADD;
                break;
            //ATTACHED FILE
            case Pages.BackEnds.STR_ATTCHEDFILE :
                strPath = strPath + Config.ADMIN_FOLDER_ATTACHEDFILE + Pages.BackEnds.CONTROL_ATTACHED ;
                break;
            case Pages.BackEnds.STR_ATTCHEDFILE_ADD :
                strPath = strPath + Config.ADMIN_FOLDER_ATTACHEDFILE + Pages.BackEnds.CONTROL_ATTACHED_ADD ;
                break;
            //STATIC PAGE
            case Pages.BackEnds.STR_STATICPAGE :
                strPath = strPath + Config.ADMIN_FOLDER_STATICPAGE + Pages.BackEnds.CONTROL_STATICPAGE ;
                break;
            case Pages.BackEnds.STR_STATICPAGE_ADD :
                strPath = strPath + Config.ADMIN_FOLDER_STATICPAGE + Pages.BackEnds.CONTROL_STATICPAGE_ADD ;
                break;
            //NEWS
            case Pages.BackEnds.STR_NEWS:
                strPath = strPath + Config.ADMIN_FOLDER_NEWS + Pages.BackEnds.CONTROL_NEWS;
                break;
            case Pages.BackEnds.STR_NEWS_ADD:
                strPath = strPath + Config.ADMIN_FOLDER_NEWS + Pages.BackEnds.CONTROL_NEWS_ADD;
                break;
            //NEWS CATEGORY
            case Pages.BackEnds.STR_NEWSCAT :
                strPath = strPath + Config.ADMIN_FOLDER_NEWS + Pages.BackEnds.CONTROL_NEWSCAT ;
                break;
            case Pages.BackEnds.STR_NEWSCAT_ADD :
                strPath = strPath + Config.ADMIN_FOLDER_NEWS + Pages.BackEnds.CONTROL_NEWSCAT_ADD;
                break;
            //COMMENT
            case Pages.BackEnds.STR_COMMENT :
                strPath = strPath + Config.ADMIN_FOLDER_NEWS + Pages.BackEnds.CONTROL_COMMENT ;
                break;
            case Pages.BackEnds.STR_COMMENT_ADD :
                strPath = strPath + Config.ADMIN_FOLDER_NEWS + Pages.BackEnds.CONTROL_COMMENT_ADD ;
                break;
            //PRODUCT
            case Pages.BackEnds.STR_PRODUCT :
                strPath = strPath + Config.ADMIN_FOLDER_PRODUCT + Pages.BackEnds.CONTROL_PRODUCT ;
                break;
            case Pages.BackEnds.STR_PRODUCT_ADD :
                strPath = strPath + Config.ADMIN_FOLDER_PRODUCT + Pages.BackEnds.CONTROL_PRODUCT_ADD ;
                break;
            //PRODUCT CATEGORY
            case Pages.BackEnds.STR_PRODUCTCAT :
                strPath = strPath + Config.ADMIN_FOLDER_PRODUCT + Pages.BackEnds.CONTROL_PRODUCTCAT ;
                break;
            case Pages.BackEnds.STR_PRODUCTCAT_ADD :
                strPath = strPath + Config.ADMIN_FOLDER_PRODUCT + Pages.BackEnds.CONTROL_PRODUCTCAT_ADD ;
                break;
            //MATERIAL
            case Pages.BackEnds.STR_MATERIAL :
                strPath = strPath + Config.ADMIN_FOLDER_PRODUCT + Pages.BackEnds.CONTROL_MATERIAL ;
                break;
            case Pages.BackEnds.STR_MATERIAL_ADD :
                strPath = strPath + Config.ADMIN_FOLDER_PRODUCT + Pages.BackEnds.CONTROL_MATERIAL_ADD ;
                break;
            //CAREER
            case Pages.BackEnds.STR_CAREER :
                strPath = strPath + Config.ADMIN_FOLDER_CAREER  + Pages.BackEnds.CONTROL_CAREER ;
                break;
            case Pages.BackEnds.STR_CAREER_ADD :
                strPath = strPath + Config.ADMIN_FOLDER_CAREER + Pages.BackEnds.CONTROL_CAREER_ADD ;
                break;
            //COLOR
            case Pages.BackEnds.STR_COLOR :
                strPath = strPath + Config.ADMIN_FOLDER_PRODUCT + Pages.BackEnds.CONTROL_COLOR ;
                break;
            case Pages.BackEnds.STR_COLOR_ADD :
                strPath = strPath + Config.ADMIN_FOLDER_PRODUCT + Pages.BackEnds.CONTROL_COLOR_ADD ;
                break;
            //TRADEMARK
            case Pages.BackEnds.STR_TRADEMARK :
                strPath = strPath + Config.ADMIN_FOLDER_PRODUCT + Pages.BackEnds.CONTROL_TRADEMARK ;
                break;
            case Pages.BackEnds.STR_TRADEMARK_ADD :
                strPath = strPath + Config.ADMIN_FOLDER_PRODUCT + Pages.BackEnds.CONTROL_TRADEMARK_ADD ;
                break;
            //GALLERIES
            case Pages.BackEnds.STR_ALBUM:
                strPath = strPath + Config.ADMIN_FOLDER_GALLERY + Pages.BackEnds.CONTROL_ALBUM;
                break;
            case Pages.BackEnds.STR_ALBUM_ADD:
                strPath = strPath + Config.ADMIN_FOLDER_GALLERY + Pages.BackEnds.CONTROL_ALBUM_ADD;
                break;

            //SETTING
            case Pages.BackEnds.STR_SETTING:
                strPath = strPath + Config.ADMIN_FOLDER_SETTING + Pages.BackEnds.CONTROL_SETTING;
                break;
            //PRIVATE
            case Pages.BackEnds.STR_USER_PRIVATE:
                strPath = strPath + Config.ADMIN_FOLDER_USERS + Pages.BackEnds.CONTROL_PRIVATE;
                break;
         
            //USER
            case Pages.BackEnds.STR_USER:
                strPath = strPath + Config.ADMIN_FOLDER_USERS + Pages.BackEnds.CONTROL_USER;
                break;
            case Pages.BackEnds.STR_USER_ADD:
                strPath = strPath + Config.ADMIN_FOLDER_USERS + Pages.BackEnds.CONTROL_USER_ADD;
                break;
       

            //DEPARTMENT
            case Pages.BackEnds.STR_DEPARTMENT :
                strPath = strPath + Config.ADMIN_FOLDER_COMPANY  + Pages.BackEnds.CONTROL_DEPARTMENT ;
                break;
            case Pages.BackEnds.STR_DEPARTMENT_ADD :
                strPath = strPath + Config.ADMIN_FOLDER_COMPANY + Pages.BackEnds.CONTROL_DEPARTMENT_ADD ;
                break;

            //HOTLINE
            case Pages.BackEnds.STR_HOTLINE :
                strPath = strPath + Config.ADMIN_FOLDER_COMPANY + Pages.BackEnds.CONTROL_HOTLINE ;
                break;
            case Pages.BackEnds.STR_HOTLINE_ADD :
                strPath = strPath + Config.ADMIN_FOLDER_COMPANY + Pages.BackEnds.CONTROL_HOTLINE_ADD ;
                break;

            //LIVE
            case Pages.BackEnds.STR_LIVESUPPORT :
                strPath = strPath + Config.ADMIN_FOLDER_COMPANY + Pages.BackEnds.CONTROL_LIVESUPPORT  ;
                break;
            case Pages.BackEnds.STR_LIVESUPPORT_ADD :
                strPath = strPath + Config.ADMIN_FOLDER_COMPANY + Pages.BackEnds.CONTROL_LIVESUPPORT_ADD ;
                break;

            //OFFCIE
            case Pages.BackEnds.STR_COMPANY :
                strPath = strPath + Config.ADMIN_FOLDER_COMPANY + Pages.BackEnds.CONTROL_OFFICE ;
                break;
            case Pages.BackEnds.STR_COMPANY_ADD:
                strPath = strPath + Config.ADMIN_FOLDER_COMPANY + Pages.BackEnds.CONTROL_OFFICE_ADD;
                break;
            //LINK
            case Pages.BackEnds.STR_LINK:
                strPath = strPath + Config.ADMIN_FOLDER_LINK + Pages.BackEnds.CONTROL_LINK ;
                break;
            case Pages.BackEnds.STR_LINK_ADD:
                strPath = strPath + Config.ADMIN_FOLDER_LINK + Pages.BackEnds.CONTROL_LINK_ADD ;
                break;
            case Pages.BackEnds.STR_CRUISE:
                strPath = strPath + Config.ADMIN_FOLDER_CRUISE + Pages.BackEnds.CONTROL_CRUISE;
                break;
            case Pages.BackEnds.STR_CRUISE_ADD:
                strPath = strPath + Config.ADMIN_FOLDER_CRUISE + Pages.BackEnds.CONTROL_CRUISE_ADD;
                break;
            //Tour
            case Pages.BackEnds.STR_TOUR:
                strPath = strPath + Config.ADMIN_FOLDER_TOUR + Pages.BackEnds.CONTROL_TOUR;
                break;
            case Pages.BackEnds.STR_TOUR_ADD:
                strPath = strPath + Config.ADMIN_FOLDER_TOUR + Pages.BackEnds.CONTROL_TOUR_ADD;
                break;
            
            case Pages.BackEnds.STR_TESTIMONIAL:
                strPath = strPath + Config.ADMIN_FOLDER_TESTIMONIAL + Pages.BackEnds.CONTROL_TESTIMONIAL;
                break;
            case Pages.BackEnds.STR_TESTIMONIAL_ADD:
                strPath = strPath + Config.ADMIN_FOLDER_TESTIMONIAL + Pages.BackEnds.CONTROL_TESTIMONIAL_ADD;
                break;
            case Pages.BackEnds.STR_HOTEL:
                strPath = strPath + Config.ADMIN_FOLDER_HOTEL + Pages.BackEnds.CONTROL_HOTEL;
                break;
            case Pages.BackEnds.STR_HOTEL_ADD:
                strPath = strPath + Config.ADMIN_FOLDER_HOTEL + Pages.BackEnds.CONTROL_HOTEL_ADD;
                break;
            case Pages.BackEnds.STR_HOTELPOPULAR:
                strPath = strPath + Config.ADMIN_FOLDER_HOTEL + Pages.BackEnds.CONTROL_HOTELPOPULAR;
                break;
            case Pages.BackEnds.STR_HOTELPOPULAR_ADD:
                strPath = strPath + Config.ADMIN_FOLDER_HOTEL + Pages.BackEnds.CONTROL_HOTELPOPULAR_ADD;
                break;

            case Pages.BackEnds.STR_BANNER:
                strPath = strPath + Config.ADMIN_FOLDER_BANNER + Pages.BackEnds.CONTROL_BANNER;
                break;
            case Pages.BackEnds.STR_BANNER_ADD:
                strPath = strPath + Config.ADMIN_FOLDER_BANNER + Pages.BackEnds.CONTROL_BANNER_ADD;
                break;
            case Pages.BackEnds.STR_VIDEO:
                strPath = strPath + Config.ADMIN_FOLDER_VIDEO + Pages.BackEnds.CONTROL_VIDEO;
                break;
            case Pages.BackEnds.STR_VIDEO_ADD:
                strPath = strPath + Config.ADMIN_FOLDER_VIDEO + Pages.BackEnds.CONTROL_VIDEO_ADD;
                break;

            case Pages.BackEnds.STR_TOURBOOKING:
                strPath = strPath + Config.ADMIN_FOLDER_TOUR + Pages.BackEnds.CONTROL_TOURBOOKING;
                break;
            case Pages.BackEnds.STR_TOURBOOKING_ADD:
                strPath = strPath + Config.ADMIN_FOLDER_TOUR + Pages.BackEnds.CONTROL_TOURBOOKING_ADD;
                break;
            case Pages.BackEnds.STR_TOURDEPARTURE:
                strPath = strPath + Config.ADMIN_FOLDER_TOUR + Pages.BackEnds.CONTROL_TOURDEPARTURE;
                break;
            case Pages.BackEnds.STR_TOURDEPARTURE_ADD:
                strPath = strPath + Config.ADMIN_FOLDER_TOUR + Pages.BackEnds.CONTROL_TOURDEPARTURE_ADD;
                break;
            case Pages.BackEnds.STR_TOURDESTINATION:
                strPath = strPath + Config.ADMIN_FOLDER_TOUR + Pages.BackEnds.CONTROL_TOURDESTINATION;
                break;
            case Pages.BackEnds.STR_TOURDESTINATION_ADD:
                strPath = strPath + Config.ADMIN_FOLDER_TOUR + Pages.BackEnds.CONTROL_TOURDESTINATION_ADD;
                break;
            case Pages.BackEnds.STR_TRANSPORT:
                strPath = strPath + Config.ADMIN_FOLDER_TOUR + Pages.BackEnds.CONTROL_TOURTRANSPORT;
                break;
            case Pages.BackEnds.STR_TOURSALEOFF:
                strPath = strPath + Config.ADMIN_FOLDER_TOUR + Pages.BackEnds.CONTROL_TOURSALEOFF;
                break;
            case Pages.BackEnds.STR_TOURSALEOFF_ADD:
                strPath = strPath + Config.ADMIN_FOLDER_TOUR + Pages.BackEnds.CONTROL_TOURSALEOFF_ADD;
                break;
            case Pages.BackEnds.STR_TRANSPORT_ADD:
                strPath = strPath + Config.ADMIN_FOLDER_TOUR + Pages.BackEnds.CONTROL_TOURTRANSPORT_ADD;
                break;
            case Pages.BackEnds.STR_REGION:
                strPath = strPath + Config.ADMIN_FOLDER_TOUR + Pages.BackEnds.CONTROL_REGION;
                break;
            case Pages.BackEnds.STR_REGION_ADD:
                strPath = strPath + Config.ADMIN_FOLDER_TOUR + Pages.BackEnds.CONTROL_REGION_ADD;
                break;
            case Pages.BackEnds.STR_ARRIVEDDESTINATION:
                strPath = strPath + Config.ADMIN_FOLDER_TOUR + Pages.BackEnds.CONTROL_ARRIVEDDESTINATION;
                break;
            case Pages.BackEnds.STR_ARRIVEDDESTINATION_ADD:
                strPath = strPath + Config.ADMIN_FOLDER_TOUR + Pages.BackEnds.CONTROL_ARRIVEDDESTINATION_ADD;
                break;


            case Pages.BackEnds.STR_TOURCATEGORY:
                strPath = strPath + Config.ADMIN_FOLDER_TOUR + Pages.BackEnds.CONTROL_TOURCATEGORY;
                break;
            case Pages.BackEnds.STR_TOURDURATION:
                strPath = strPath + Config.ADMIN_FOLDER_TOUR + Pages.BackEnds.CONTROL_DUARATON;
                break;
            case Pages.BackEnds.STR_COUNTRY:
                strPath = strPath + Config.ADMIN_FOLDER_TOUR + Pages.BackEnds.CONTROL_COUNTRY;
                break;
            case Pages.BackEnds.STR_COUNTRY_ADD:
                strPath = strPath + Config.ADMIN_FOLDER_TOUR + Pages.BackEnds.CONTROL_COUNTRYADD;
                break;
            case Pages.BackEnds.STR_TOURPOPULAR:
                strPath = strPath + Config.ADMIN_FOLDER_TOUR + Pages.BackEnds.CONTROL_TOURPOPULAR;
                break;
            case Pages.BackEnds.STR_TOURPOPULAR_ADD:
                strPath = strPath + Config.ADMIN_FOLDER_TOUR + Pages.BackEnds.CONTROL_TOURPOPULARADD;
                break;
            case Pages.BackEnds.STR_TOURDURATION_ADD:
                strPath = strPath + Config.ADMIN_FOLDER_TOUR + Pages.BackEnds.CONTROL_DUARATONADD;
                break;
            case Pages.BackEnds.STR_TOURCATEGORY_ADD:
                strPath = strPath + Config.ADMIN_FOLDER_TOUR + Pages.BackEnds.CONTROL_TOURCATEGORYADD;
                break;






            case Pages.BackEnds.STR_CUSTOMERCOUNTRY:
                strPath = strPath + Config.ADMIN_FOLDER_TOURCUSTOMIZATON + Pages.BackEnds.CONTROL_CUSTOMERCOUNTRY;
                break;
            case Pages.BackEnds.STR_CUSTOMERCOUNTRY_ADD:
                strPath = strPath + Config.ADMIN_FOLDER_TOURCUSTOMIZATON + Pages.BackEnds.CONTROL_CUSTOMERCOUNTRY_ADD;
                break;
            case Pages.BackEnds.STR_HOTELOPTION:
                strPath = strPath + Config.ADMIN_FOLDER_TOURCUSTOMIZATON + Pages.BackEnds.CONTROL_HOTELOPTION;
                break;
            case Pages.BackEnds.STR_HOTELOPTION_ADD:
                strPath = strPath + Config.ADMIN_FOLDER_TOURCUSTOMIZATON + Pages.BackEnds.CONTROL_HOTELOPTION_ADD;
                break;
            case Pages.BackEnds.STR_BOOKINGHOTEL_ADD:
                strPath = strPath + Config.ADMIN_FOLDER_HOTEL + Pages.BackEnds.CONTROL_BOOKINGHOTEL_ADD;
                break;
            case Pages.BackEnds.STR_BOOKINGHOTEL:
                strPath =  strPath + Config.ADMIN_FOLDER_HOTEL + Pages.BackEnds.CONTROL_BOOKINGHOTEL;
                break;
            case Pages.BackEnds.STR_MEAL:
                strPath = strPath + Config.ADMIN_FOLDER_TOURCUSTOMIZATON + Pages.BackEnds.CONTROL_MEAL;
                break;
            case Pages.BackEnds.STR_MEAL_ADD:
                strPath = strPath + Config.ADMIN_FOLDER_TOURCUSTOMIZATON + Pages.BackEnds.CONTROL_MEAL_ADD;
                break;
            case Pages.BackEnds.STR_PORTOFARRIVAL:
                strPath = strPath + Config.ADMIN_FOLDER_TOURCUSTOMIZATON + Pages.BackEnds.CONTROL_PORTOFARRIVAL;
                break;
            case Pages.BackEnds.STR_PORTOFARRIVAL_ADD:
                strPath = strPath + Config.ADMIN_FOLDER_TOURCUSTOMIZATON + Pages.BackEnds.CONTROL_PORTOFARRIVAL_ADD;
                break;
            case Pages.BackEnds.STR_TOURCUSTOMIZATION:
                strPath = strPath + Config.ADMIN_FOLDER_TOURCUSTOMIZATON + Pages.BackEnds.CONTROL_TOURCUSTOMIZATION;
                break;
            case Pages.BackEnds.STR_TOURCUSTOMIZATION_ADD:
                strPath = strPath + Config.ADMIN_FOLDER_TOURCUSTOMIZATON + Pages.BackEnds.CONTROL_TOURCUSTOMIZATION_ADD;
                break;
            case Pages.BackEnds.STR_TOURGUIDE:
                strPath = strPath + Config.ADMIN_FOLDER_TOURCUSTOMIZATON + Pages.BackEnds.CONTROL_TOURGUIDE;
                break;
            case Pages.BackEnds.STR_TOURGUIDE_ADD:
                strPath = strPath + Config.ADMIN_FOLDER_TOURCUSTOMIZATON + Pages.BackEnds.CONTROL_TOURGUIDE_ADD;
                break;
            case Pages.BackEnds.STR_TYPEOFTOURCUSTOMIZATION:
                strPath = strPath + Config.ADMIN_FOLDER_TOURCUSTOMIZATON + Pages.BackEnds.CONTROL_TYPEOFTOURCUSTOMIZATION;
                break;
            case Pages.BackEnds.STR_TYPEOFTOURCUSTOMIZATION_ADD:
                strPath = strPath + Config.ADMIN_FOLDER_TOURCUSTOMIZATON + Pages.BackEnds.CONTROL_TYPEOFTOURCUSTOMIZATION_ADD;
                break;

            case Pages.BackEnds.STR_ENTRYVISA:
                strPath = strPath + Config.ADMIN_FOLDER_ENTRYVISA + Pages.BackEnds.CONTROL_ENTRYVISA;
                break;
            case Pages.BackEnds.STR_ENTRYVISA_ADD:
                strPath = strPath + Config.ADMIN_FOLDER_ENTRYVISA + Pages.BackEnds.CONTROL_ENTRYVISA_ADD;
                break;



            default:
                strPath = strPath + Config.ADMIN_FOLDER_NEWS + Pages.BackEnds.CONTROL_NEWS;
                break;
        }
        PlhContent.Controls.Clear();
        PlhContent.Controls.Add(Page.LoadControl(strPath));
    }

    private bool IsLogIn()
    {
        bool isLoged = false;
        if ( Session[Config.SESSION_USEREMAIL] != null)
            isLoged = true;
        return isLoged;
    }

    private void RedirecToPage(string Page)
    {
        Response.Redirect(Page);
    }

    private void CheckPermission()
    {
        string sEmail = ConvertData.ConvertToString(Session[Config.SESSION_USEREMAIL]);
        if (sEmail != "" || sEmail != string.Empty)
        {
            Users objUser = new Users();
            DataTable dtbUser = new DataTable();
            dtbUser = objUser.GetUserByEmail(sEmail,1);
            int nRoleID = ConvertData.ConvertToInt(dtbUser.Rows[0]["RoleID"]);
            if (nRoleID == 1)
            {
                divSetting.Visible = true;
                divUser.Visible = true;
                divStaticPage.Visible = true; 
            }
            else
            {
                divSetting.Visible = false;
                divUser.Visible = false;
                divStaticPage.Visible = false; 
            }
        }
    }
   
    protected void lnkLogout_Click(object sender, ImageClickEventArgs e)
    {
        string sHomePage = "~/" + Pages.FrontEnds.HOME;
        Session.Clear();
        Response.Redirect(sHomePage);
    }
}
